package com.xlongwei.accounts.view;

import java.time.LocalDate;
import java.util.List;

import org.noear.solon.validation.annotation.Pattern;

import lombok.Data;

@Data
public class Report {
    private @Pattern("^(ledger|account|member|user)$") String groupBy;
    private @Pattern("^\\d{4}$") String year;
    private LocalDate end;
    private List<Integer> userids, accountids, ledgerids, memberids;

    public boolean isCountRecords() {
        return ledgerids != null && ledgerids.size() == 1 && ledgerids.get(0) == 4;
    }
}
